package com.xq.demo;

import com.alibaba.fastjson.JSON;
import lombok.Data;

public class Test7 {

    public static void main(String[] args) {
        Test7 test7 = new Test7();
       // int a=1;
        //test7.test1(a);
        //System.out.println("main:"+a);
       /* String c ="dabao";
        test7.test2(c);
        System.out.println("main:"+c);*/

      User user = new User();
       user.setName("sanbao");

        test7.test3(user);
        System.out.println("main:"+ JSON.toJSONString(user));

    }

    public void test1(int a){
        a=100;
        System.out.println("test1:"+a);
    }

    public void test2(String c){
        c="大宝";
        System.out.println("test2:"+c);
    }

    public void test3(User user){
        user.setName("三宝");
        System.out.println("test3:"+ JSON.toJSONString(user));
    }


    public static class User{
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }


}
